<template>
    <view>
        <view style="height: 20px"></view>
        <view style="margin: 20px;text-align: center;font-size: 26px;font-weight: bold;" class="main-color">
            <label>奇辰OPEN-API</label>
        </view>
        <view class="api-panel">
            <view class="api">
                <button class="wx-bg-color" style="color: white" @click="pay">微信支付</button>
            </view>
        </view>
        <mymenu :activeMenu="'index'"></mymenu>
    </view>
</template>

<script>
import { pay as wxPay } from '@/pay/api/wx'

import mymenu from '@/widget/components/Menu'

export default {
    components: { mymenu },
    data() {
        return {
        }
    },
    created() {
    },
    methods: {
        pay() {
            let user_info = uni.getStorageSync('user_info')
            wxPay({
                openid: user_info.openid
            }).then(res => {
                console.log(res)
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.api {
    margin: 10px
}
</style>